﻿namespace FiftyOne.Foundation.Mobile.Detection.Wurfl.Configuration
{
    using FiftyOne.Foundation.Mobile.Configuration;
    using System;
    using System.Configuration;

    public sealed class WurflSection : ConfigurationSection
    {
        [ConfigurationProperty("capabilitiesWhiteList", IsRequired=false)]
        public CapabilityCollection CapabilitiesWhiteList
        {
            get
            {
                return (CapabilityCollection) base["capabilitiesWhiteList"];
            }
        }

        [StringValidator(InvalidCharacters="!@#$%^&*()[]{};'\"|", MaxLength=7), ConfigurationProperty("newDeviceDetail", IsRequired=false, DefaultValue="minimum")]
        public string NewDeviceDetail
        {
            get
            {
                return (string) base["newDeviceDetail"];
            }
        }

        [ConfigurationProperty("newDevicesURL", IsRequired=false), StringValidator(InvalidCharacters="!@#$%^&*()[]{};'\"|", MaxLength=0xff)]
        public string NewDevicesURL
        {
            get
            {
                return (string) base["newDevicesURL"];
            }
        }

        [ConfigurationProperty("useActualDeviceRoot", IsRequired=false, DefaultValue="false")]
        public bool UseActualDeviceRoot
        {
            get
            {
                return (bool) base["useActualDeviceRoot"];
            }
        }

        [ConfigurationProperty("wurflFilePath", IsRequired=false, DefaultValue="~/bin/wurfl.xml.gz"), StringValidator(InvalidCharacters="!@#$%^&*()[]{};'\"|", MaxLength=0xff)]
        public string WurflFilePath
        {
            get
            {
                return (string) base["wurflFilePath"];
            }
        }

        [ConfigurationProperty("wurflPatches", IsRequired=false)]
        public PatchesCollection WurflPatches
        {
            get
            {
                return (PatchesCollection) base["wurflPatches"];
            }
        }

        [ConfigurationProperty("wurflUpdateUrls", IsRequired=false)]
        public UrlCollection WurflUpdateUrls
        {
            get
            {
                return (UrlCollection) base["wurflUpdateUrls"];
            }
        }
    }
}

